package com.elastic.utils;

import com.elastic.exceptions.ESException;
import org.springframework.util.StringUtils;

/**
 * @ClassName PramCheck
 * @Author xiezhuocai
 * @Description 参数强制校验
 * @Date 2021/12/22 14:17
 */
public class PramCheck {
    public static void isNotNull(Object object){
        if (object == null) {
            new ESException("错误参数");
        }
    }

    public static void isNotNull(Integer object){
        if (object == null) {
            new ESException("错误参数");
        }
    }

    public static void isNotNull(String object){
        if (StringUtils.isEmpty(object)) {
            new ESException("错误参数");
        }
    }
}
